import Vue from "vue";

import "normalize.css/normalize.css"; // 重置CSS

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import locale from "element-ui/lib/locale/lang/zh-CN"; // lang i18n

import "@/styles/index.scss"; // 全局 css

import App from "./App";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control
import "../src/utils/request";

/**
 * SocketIO
 */
// import VueSocketIO from 'vue-socket.io'
// Vue.use(new VueSocketIO({
//   debug: true,
//   connection: 'http://zzadmin.cc:8080',
//   options: { transports: ['websocket', 'polling'] }
// }))

/**
 * 使用mock模拟接口,
 * 上线前删除 ! ! !
 */
// if (.NODE_ENV === 'production') {
//   const { mockXHR } = require('../mock')
//   mockXHR()
// }

Vue.use(ElementUI, { locale });

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
